import { SetMetadata, applyDecorators } from '@nestjs/common'

export const EVENT_NAME = Symbol('EVENT_NAME')
export const DECORATOR_ON = Symbol('DECORATOR_ON')
export const On = (eventName: string) => applyDecorators(
  SetMetadata(EVENT_NAME, eventName),
  SetMetadata(DECORATOR_ON, true),
)